Optimal. Leaf size=61 \[ \frac{2^{-n} n (1-x)^{n+1} \, _2F_1\left (n,n+1;n+2;\frac{1-x}{2}\right )}{n+1}-\frac{1}{2} (1-x)^{n+1} (x+1)^{1-n} \]
[Out]
_______________________________________________________________________________________
Rubi [A] time = 0.0476947, antiderivative size = 61, normalized size of antiderivative = 1., number of steps used = 2, number of rules used = 2, integrand size = 16, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.125 \[ \frac{2^{-n} n (1-x)^{n+1} \, _2F_1\left (n,n+1;n+2;\frac{1-x}{2}\right )}{n+1}-\frac{1}{2} (1-x)^{n+1} (x+1)^{1-n} \]
Antiderivative was successfully verified.
[In] Int[((1 - x)^n*x)/(1 + x)^n,x]
[Out]
_______________________________________________________________________________________
Rubi in Sympy [A] time = 5.47795, size = 44, normalized size = 0.72 \[ - \frac{2^{n} n \left (x + 1\right )^{- n + 1}{{}_{2}F_{1}\left (\begin{matrix} - n, - n + 1 \\ - n + 2 \end{matrix}\middle |{\frac{x}{2} + \frac{1}{2}} \right )}}{- n + 1} - \frac{\left (- x + 1\right )^{n + 1} \left (x + 1\right )^{- n + 1}}{2} \]
Verification of antiderivative is not currently implemented for this CAS.
[In] rubi_integrate((1-x)**n*x/((1+x)**n),x)
[Out]
_______________________________________________________________________________________
Mathematica [C] time = 0.14617, size = 79, normalized size = 1.3 \[ \frac{3 x^2 (1-x)^n (x+1)^{-n} F_1(2;-n,n;3;x,-x)}{2 (3 F_1(2;-n,n;3;x,-x)-n x (F_1(3;1-n,n;4;x,-x)+F_1(3;-n,n+1;4;x,-x)))} \]
Warning: Unable to verify antiderivative.
[In] Integrate[((1 - x)^n*x)/(1 + x)^n,x]
[Out]
_______________________________________________________________________________________
Maple [F] time = 0.079, size = 0, normalized size = 0. \[ \int{\frac{ \left ( 1-x \right ) ^{n}x}{ \left ( 1+x \right ) ^{n}}}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In] int((1-x)^n*x/((1+x)^n),x)
[Out]
_______________________________________________________________________________________
Maxima [F] time = 0., size = 0, normalized size = 0. \[ \int{\left (x + 1\right )}^{-n} x{\left (-x + 1\right )}^{n}\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In] integrate(x*(-x + 1)^n/(x + 1)^n,x, algorithm="maxima")
[Out]
_______________________________________________________________________________________
Fricas [F] time = 0., size = 0, normalized size = 0. \[{\rm integral}\left (\frac{x{\left (-x + 1\right )}^{n}}{{\left (x + 1\right )}^{n}}, x\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In] integrate(x*(-x + 1)^n/(x + 1)^n,x, algorithm="fricas")
[Out]
_______________________________________________________________________________________
Sympy [F(-1)] time = 0., size = 0, normalized size = 0. \[ \text{Timed out} \]
Verification of antiderivative is not currently implemented for this CAS.
[In] integrate((1-x)**n*x/((1+x)**n),x)
[Out]
_______________________________________________________________________________________
GIAC/XCAS [F] time = 0., size = 0, normalized size = 0. \[ \int \frac{x{\left (-x + 1\right )}^{n}}{{\left (x + 1\right )}^{n}}\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In] integrate(x*(-x + 1)^n/(x + 1)^n,x, algorithm="giac")
[Out]